package com.project.template.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.time.LocalDate;

@Data
public class LoginDTO {

    @NotBlank(message = "用户名不能为空")
    private String username;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误")
    private String phone;

    @Size(min = 6, message = "密码至少6位")
    private String password;

    private String sex;
    private LocalDate birth;
    private String address;
}
